#|
key_works <- oa_fetch(
entity = "works",
doi = dois,
verbose = FALSE
)
ids <- openalexR:::shorten_oaid(key_works$id)
# citing_kp <- lapply(
# ids,
# function(id) {
# oa_fetch(
# entity = "works",
# output = "tibble",
# cites = id,
# verbose = FALSE
# )
# }
# )
# names(citing_kp) <- ids
# cited_by_kp <- lapply(
# ids,
# function(id) {
# oa_fetch(
# entity = "works",
# output = "tibble",
# cited_by = id,
# verbose = FALSE
# )
# }
# )
# names(cited_by_kp) <- ids
fn <- file.path("data", "snowball.rds")
if (file.exists(fn)) {
snowball <- readRDS(fn)
} else {
snowball <- oa_snowball(
identifier = ids,
verbose = FALSE
)
saveRDS(snowball, fn)
}
flat_snow <- snowball2df(snowball) |>
tibble::as_tibble()
key_works_cit <- list(
c(cit = "Fisher et al. 2022", id = "W4220786370"),
c(cit = "Patterson et al. 2017", id = "W2520670351"),
c(cit = "Feola et al. 2015", id = "W2020319093"),
c(cit = "Loorbach et al. 2017", id = "W2204133637"),
c(cit = "Scoones et al. 2020", id = "W3001406994"),
c(cit = "Evans et al. 2023", id = "W4379647013")
)